<html>
<head><meta charset="utf-8"><title>compiletest: exclude tests by crate feature · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/compiletest.3A.20exclude.20tests.20by.20crate.20feature.html">compiletest: exclude tests by crate feature</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="216361755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/compiletest%3A%20exclude%20tests%20by%20crate%20feature/near/216361755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matthiaskrgr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/compiletest.3A.20exclude.20tests.20by.20crate.20feature.html#216361755">(Nov 11 2020 at 15:42)</a>:</h4>
<p>Is there a way to make compiletest skip certain tests when a crate feature is enabled?<br>
I could not find anything related in the manual <a href="https://rustc-dev-guide.rust-lang.org/tests/adding.html#ignoring-tests">https://rustc-dev-guide.rust-lang.org/tests/adding.html#ignoring-tests</a></p>



<a name="216377445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/compiletest%3A%20exclude%20tests%20by%20crate%20feature/near/216377445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/compiletest.3A.20exclude.20tests.20by.20crate.20feature.html#216377445">(Nov 11 2020 at 17:52)</a>:</h4>
<p>I would use test revisions and cfg_attr instead</p>



<a name="216377474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/compiletest%3A%20exclude%20tests%20by%20crate%20feature/near/216377474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/compiletest.3A.20exclude.20tests.20by.20crate.20feature.html#216377474">(Nov 11 2020 at 17:53)</a>:</h4>
<p><a href="https://rustc-dev-guide.rust-lang.org/tests/adding.html#revisions">https://rustc-dev-guide.rust-lang.org/tests/adding.html#revisions</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>